﻿using System;
using System.Collections.Generic;

namespace ProblemsSet
{
    public class Problem_110 : BaseProblem
    {
        public override object GetResult()
        {
            return MathLogic.GetMaxNDiaphant(4000000);

        }

        public override string Problem
        {
            get
            {
                return @"In the following equation x, y, and n are positive integers.

1

x
+	
1

y
=	
1

n
It can be verified that when n = 1260 there are 113 distinct solutions and this is the least value of n for which the total number of distinct solutions exceeds one hundred.

What is the least value of n for which the number of distinct solutions exceeds four million?

NOTE: This problem is a much more difficult version of problem 108 and as it is well beyond the limitations of a brute force approach it requires a clever implementation.";
            }
        }

        public override bool IsSolved
        {
            get
            {
                return true;
            }
        }

        public override object Answer
        {
            get
            {
                return 9350130049860600;
            }
        }
    }
}
